﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PSL.ST
{
    internal class ValueNode : TreeNode
    {
        public ValueNode(TreeNode Parent)
            : base(Parent, TreeNodeType.Value)
        {

        }

        /// <summary>
        /// Get and set value of the constant-node
        /// </summary>
        public dynamic Value
        {
            get;
            set;
        }

        public override TreeNode CloneNode()
        {
            ValueNode returnNode = new ValueNode(null);

            returnNode.Value = this.Value;

            return returnNode;
        }

        public override dynamic Execute(PSLEngine Engine)
        {
            return Value;
        }
    }
}
